package com.migration.model.newdb;

import jakarta.persistence.*;
import lombok.Data;
import java.io.Serializable;

/**
 * 文档表 实体类
 * 表名：risk_doc
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "risk_doc")
public class RiskDoc implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 主键ID
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    private Long id;
    
    /**
     * 租户ID
     */
    @Column(name = "tenant_id", nullable = false)
    private Long tenantId;
    
    /**
     * 部门ID
     */
    @Column(name = "department_id", nullable = false)
    private Long departmentId;
    
    /**
     * 文件类型（1：其他，2：图纸，3：停机报告）
     */
    @Column(name = "doc_type", nullable = false)
    private Byte docType;
    
    /**
     * 文件名称
     */
    @Column(name = "file_name", nullable = false, length = 255)
    private String fileName;
    
    /**
     * 上传时间（yyyy-MM-dd HH:mm:ss）
     */
    @Column(name = "upload_time", nullable = false, length = 20)
    private String uploadTime;
    
    /**
     * 到期时间（yyyy-MM-dd）
     */
    @Column(name = "expire_time", nullable = false, length = 10)
    private String expireTime;
    
    /**
     * 到期提醒（1:提前1个月，2：提前3个月，3：提前6个月）
     */
    @Column(name = "expire_remind", nullable = false)
    private Byte expireRemind;
    
    /**
     * 备注
     */
    @Column(name = "remark", length = 65535)
    private String remark;
    
    /**
     * 1：正常，2：即将过期，3：已过期
     * 默认值: 1
     */
    @Column(name = "expire_status", nullable = false)
    private Byte expireStatus;
    
    /**
     * 创建时间yyyy-MM-dd HH:mm:ss
     */
    @Column(name = "create_time", length = 20)
    private String createTime;
    
    /**
     * 创建人
     */
    @Column(name = "create_by")
    private Long createBy;
    
    /**
     * 修改时间yyyy-MM-dd HH:mm:ss
     */
    @Column(name = "update_time", length = 20)
    private String updateTime;
    
    /**
     * 修改人
     */
    @Column(name = "update_by")
    private Long updateBy;
    
    /**
     * 是否删除（0：正常，1：删除）
     * 默认值: 0
     */
    @Column(name = "is_del")
    private Byte isDel;
    
    @Override
    public String toString() {
        return "RiskDoc{" +
            "id=" + id +
            ", tenantId=" + tenantId +
            ", departmentId=" + departmentId +
            ", docType=" + docType +
            ", fileName=" + fileName +
            ", uploadTime=" + uploadTime +
            ", expireTime=" + expireTime +
            ", expireRemind=" + expireRemind +
            ", remark=" + remark +
            ", expireStatus=" + expireStatus +
            ", createTime=" + createTime +
            ", createBy=" + createBy +
            ", updateTime=" + updateTime +
            ", updateBy=" + updateBy +
            ", isDel=" + isDel +
        '}';
    }
} 